<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2018/10/27
  Time: 10:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <link href="../../bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script src="bootstrap/js/jquery.min.js"></script>
    <script src="../../bootstrap/js/bootstrap.min.js"></script>
    <title>用户</title>
    <style>
        h3,tr,th{
            text-align: center;
        }
        #back{
            float: right;
        }
    </style>
</head>
<body>
<h3>用户列表</h3>
<c:set var="root" value="${pageContext.request.contextPath}"/>
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>
                        编号
                    </th>
                    <th>
                        用户名
                    </th>
                    <th>
                        密码
                    </th>
                    <th>
                        真实姓名
                    </th>
                    <th>
                        邮箱
                    </th>
                    <th>
                        电话
                    </th>
                    <th>
                        地址
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                </thead>
                <tbody>
                <c:set var="list" value="${sessionScope.list}"/>
                <c:forEach items="${list}" var="p" varStatus="status">
                        <tr>
                            <td>
                                    ${status.count}
                            </td>
                            <td>
                                ${p.username}
                            </td>
                            <td>
                                ${p.password}
                            </td>
                            <td>
                                ${p.name}
                            </td>
                            <td>
                                ${p.email}
                            </td>
                            <td>
                                ${p.phone}
                            </td>
                            <td>
                                ${p.addr}
                            </td>
                            <td>
                                <a href="${root}/deleteServlet?uid=${p.uid}">
                                    <button type="button" class="btn btn-default">删除</button>
                                </a>
                            </td>
                        </tr>
                </c:forEach>
                </tbody>
            </table>
<a href="${root}/main.jsp">
    <button type="button" class="btn btn-default btn-primary" id="back">返回</button>
</a>
</body>
</html>
